$file1 = $ARGV[0];
$file2 = $ARGV[1];
chomp $file1;
chomp $file2;

open(BUFF1,$file1);
open(BUFF2,$file2);
$n1 =1;
while($line = <BUFF1>)
{
	$line =~ s/\n//g;
	$line =~ s/\r//g;
	$line =~ s/\t//g;
	$line =~ s/\s//g;	
	$n1++;
	$hash1{$line} = 1;
}

$n2 =1;
while($line = <BUFF2>)
{
        $line =~ s/\n//g;
        $line =~ s/\r//g;
        $line =~ s/\t//g;
        $line =~ s/\s//g;
        $n2++;
        $hash2{$line} = 2;
}

$n3 = 1;
while (($key, $value) = each(%hash1)){
     if($hash2{$key} == 2)
	{ $n3++;}
}

$n4 = 1;
while (($key, $value) = each(%hash2)){
     if($hash1{$key} == 1)
        { $n4++;}
}

print $n1."\t".$n2."\t".$n3."\t".$n4."\n";

